// src\store\modules\billAction.js
import store from '../index'
import axios from "axios";

// 保存bill
export const saveBillList = data => ({ type: 'save', data });
// 异步action
// 获取bill列表
export const getBillList = () => {
    return async () => {
        // console.log("!!!!!!!!1",dispatch);
        // 异步请求
        const res = await axios.get('http://localhost:8888/ka');
        store.dispatch(saveBillList(res.data));
    }
}